var html=`<ul>
<li>
    <span>基本信息</span>
    <ul class="Accordion_part">
        <li><a href="company_information.html" id="company_information">公司信息</a></li>
        <li><a href="organize.html" id="organize">组织架构</a></li>
        <li><a href="teamManage.html" id="teamManage">团队高管</a></li>
    </ul>
</li>
</ul>
<ul>
<li>
    <span>关于我们</span>
    <ul class="Accordion_part">
        <li><a href="companyCourse.html" id="company_course">公司历程</a></li>
        <li><a href="contactUs.html" id="contactUs">联系我们</a></li>
    </ul>
</li>
</ul>
<ul>
<li>
    <span>帮助中心</span>
    <ul class="Accordion_part">
        <li><a href="commonProblem.html" id="commonProblem">常见问题</a></li>
        <li><a href="cardRule.html" id="cardRule">卡券规则</a></li>
    </ul>
</li>
</ul>
<ul>
<li>
    <span>媒体公告</span>
    <ul class="Accordion_part">
        <li><a href="media.html" id="media">媒体公告</a></li>
    </ul>
</li>
</ul>
<ul>
<li>
    <span>平台公告</span>
    <ul class="Accordion_part">
        <li><a href="announcement.html" id="announcement">平台公告</a></li>
    </ul>
</li>
</ul>`
var Accordion=document.getElementsByClassName("Accordion")[0];
Accordion.innerHTML=html;


var Accordion_parts=document.getElementsByClassName("Accordion_part");
//console.log(Accordion_parts);
for (var Accordion_part of Accordion_parts){
 // console.log(Accordion_part)
  var span=Accordion_part.previousElementSibling;
  //console.log(span);
  //span.style.background="url('./img/top.png') no-repeat"
  span.onclick=function(){
    var Accordion_part=this.nextElementSibling;
    //console.log(Accordion_part);
    if(Accordion_part.style.display=="block"){
     //  console.log("呵呵");
       Accordion_part.style.display="none"
       this.style.background="#fff url(./img/down.png) 80% center no-repeat "
    }else{
     // console.log("哈哈")
      Accordion_part.style.display="block"
      this.style.background="#fff url(./img/top.png) 80% center no-repeat "
    }
  }
 
}

